from __future__ import absolute_import, unicode_literals
from celery import Celery

import os


# django environment
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'website.settings')

# celery instance
app = Celery('website')

# celery app
app.config_from_object('django.conf:settings', namespace='CELERY')

# check tasks
app.autodiscover_tasks()


# task message
@app.task(blind=True)
def debug_task(self):
    print('Request: {0!r}'.format(self.request))
